#pragma once
#include <opencv2/core.hpp>
#include <opencv/highgui.h>
#include <opencv/cv.h>
#include <QGraphicsItem>
#include <QGraphicsScene>
#include <QGraphicsView>
#include <Windows.h>
#include <QMutex>

class ImageView
{
public:
	ImageView(void);
	void initialise(int width,int height);
	void updateImage(IplImage* image);
	void enterWriteLock();
	void leaveWriteLock();
	void enterReadLock();
	void leaveReadLock();
	 inline IplImage* getSceneImage(){ return _imageData;}
	~ImageView(void);

private:
	SRWLOCK _lock;
	IplImage* _imageData;
};

